package cc.comac.mom.controller;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import cc.comac.mom.api.QualityParamService;
import cc.comac.mom.bean.QualityParam;
import cc.comac.mom.util.ResultBean;

@RestController
@RequestMapping("/QualityParam")
public class QualityParamController {

	@Autowired
	private QualityParamService  qualityParamService;
	
	@RequestMapping(value = "/insert",method = RequestMethod.POST)
	public ResultBean insert(@RequestBody QualityParam obj) {
		return qualityParamService.insert(obj);
	}
	
	@RequestMapping(value = "/update",method = RequestMethod.POST)
	public ResultBean update(@RequestBody QualityParam obj, HttpSession session) {
		return qualityParamService.update(obj);
	}
	
	@RequestMapping(value = "/deleteBatch",method = RequestMethod.POST)
	public ResultBean deleteBatch(@RequestBody List<QualityParam> list) {
		return qualityParamService.deleteBatch(list);
	}
	@RequestMapping(value = "/selectByCondition",method = RequestMethod.POST)
	public ResultBean selectByCondition(@RequestBody QualityParam obj) {
		return qualityParamService.selectByCondition(obj);
	}
}
